package com.jdy.haoduoaiteacher.util;

/**
 * 全局配置
 * 
 * @author Hufei
 * 
 */
public class LeConfig {
  private static LeConfig cfg = null;

  public static String g_ServerIP = "sapi.jdy520.com";// "192.168.1.200:9502";
  public static int FILE_PORT = 9621;// 9501;
  public static int current_volume = 15;// 9501;
  public static final String ALL_ADDRESS = "255.255.255.255";
  public final static String GUIDE_SP = "guide";

  public static String babyname = "Baby";
  public static String nickname = "";
//  public static String expiredAt = "";
  public static String XG_TOKEN = "";

  public static long lasttime;

  public static boolean isDeviceConnect = false;

  public static int PlayMode = 2;

  public static String OsType = "android";

  public static String QuitPopuWindow = "com.jdy.haoduoaiteacher.hasRead"; // 广播退出用户信息弹窗

  // public static boolean bRefreshMainPage;

  public static boolean isLogin = false;
  public static boolean isDeviceBinded = false;
  public static boolean isDeviceActivated = false;
  public static boolean isInfoFilled = false;
  public static boolean isDeviceVersionMatch = false;
  public static boolean isInternetAvailable = false;
  public static boolean isReady = false;
  public static boolean DEBUG_MODE = false;
  public static boolean CHECK_AT_STARTUP = false;
  public static boolean BOOK_STORY_SWITCH = false;
  public static boolean isPushDialogUP = true; // 是否 推送成功强提示

  public static String PHONE_NUM = "";
  public static String MAC_ID = "";
  public static int isDeviceOnline = 1;
  public static int CURRENT_DEVICE_VERSION = 1;
  public static final int STORY_BOOK_VERSION = 209;

  public static boolean isAllReady() {
    return isLogin; /*&& isDeviceBinded && isDeviceActivated && isInfoFilled;*/
  }

  public static void resetValue() {
    isLogin = false;
//    isDeviceBinded = false;
//    isDeviceActivated = false;
//    isInfoFilled = false;
//    isDeviceVersionMatch = false;
    isReady = false;
    DEBUG_MODE = false;
    isPushDialogUP = true;

    PHONE_NUM = "";
    MAC_ID = "";
    isDeviceOnline = 1;
    CURRENT_DEVICE_VERSION = 1;
  }

  public static LeConfig getInstance() {
    if (cfg == null) {
      cfg = new LeConfig();
    }
    return cfg;
  }
}
